feat(core): address series, steps, and background jobs by stable iden…#13
Merged
Merged
Conversation
…tity Extends the stable identity family from datasets and canvases to the remaining mutable resources, so collection positions no longer cross an action, job, or persistence boundary. - SeriesBinding carries a SeriesId from a per-plot allocator; reordering a plot's series changes their order, not their identity. - StepId becomes owner-local, minted from a dataset-owned allocator that sits outside the processing undo snapshot and therefore never rewinds into reissuing a live id. ProcessingStep::new takes the identity as its first parameter, so every construction site must state where its id came from and appending a placeholder-id step to a live pipeline is a compile error rather than a duplicated step. - Dataset action payloads and the Ilt, Dosy and Process2D job/completion pairs carry DatasetId. Completions resolve their target by id and drop the result when the dataset is gone, so a long-running job can no longer install onto whichever dataset occupies the old position. - Allocator repair on load rejects an exhausted id space instead of defaulting to zero and aliasing an existing id on the next allocation. - Projects persist allocators and identities; scheme recipes omit step ids, which an adopting dataset remints on apply. Identities are read through checked lookups, so a stale index is inert rather than fatal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extends the stable identity family from datasets and canvases to the remaining
mutable resources: plot series, processing steps, and the background jobs that
write results back into the document.
Collection positions are now one-shot lookup results only. They no longer cross
an action, job, or persistence boundary.
Why
A
usizeindex is only valid for the document revision that produced it. Anyinsertion or deletion in between silently re-points it at a different resource.
That is invisible at the type level, so it surfaces as an edit landing on the
wrong target rather than as an error.
Changes
SeriesId—SeriesBindingcarries an id minted from a per-plotallocator. Reordering a plot's series changes their order, not their identity.
StepId— now owner-local, minted from a dataset-owned allocator thatsits outside the processing undo snapshot, so undo never rewinds it into
reissuing a live id.
ProcessingStep::newtakes the identity as its firstparameter: every construction site must state where its id came from, and
appending a placeholder-id step to a live pipeline is a compile error instead
of a silently duplicated step.
Ilt,DosyandProcess2Djob/completion pairs carry
DatasetId. Completions resolve their target by idand discard the result when the dataset is gone, so a long-running job can no
longer install onto whichever dataset happens to occupy the old position.
instead of defaulting to zero and aliasing an existing id on the next
allocation.
omit step ids, which an adopting dataset remints on apply.
than fatal.
Testing
cargo pr-checkpasses: formatting, source sizes, dependency policy, adefault-configuration build of both frontends, Clippy with warnings denied, and
the test suite in both backend configurations.
Regression coverage was added for each behaviour above and verified by reverting
the fix and confirming the test fails:
existing step
another dataset
round-trip
dataset is deleted